import request from '@/utils/request'

// 查询充值订单列表
export function listRecharge(query) {
  return request({
    url: '/prod-api/order/recharge/list',
    method: 'get',
    params: query
  })
}

// 查询充值订单详细
export function getRecharge(rechargeUid) {
  return request({
    url: '/prod-api/order/recharge/' + rechargeUid,
    method: 'get'
  })
}

// 新增充值订单
export function addRecharge(data) {
  return request({
    url: '/prod-api/order/recharge',
    method: 'post',
    data: data
  })
}

// 修改充值订单
export function updateRecharge(data) {
  return request({
    url: '/prod-api/order/recharge',
    method: 'put',
    data: data
  })
}

// 删除充值订单
export function delRecharge(rechargeUid) {
  return request({
    url: '/prod-api/order/recharge/' + rechargeUid,
    method: 'delete'
  })
}


// 门店分组
export function storeGroup() {
  return request({
    url: '/prod-api/system/group/groupList',
    method: 'get',
  })
}

//储值订单现金统计
export function rechargeInfoTotal(query) {
  return request({
    url: '/prod-api/order/recharge/sumList',
    method: 'get',
    params: query
  })
}